3.214 \(\int (f+g x) \log (c (d+e x^n)^p) \, dx\)

Optimal. Leaf size=132 \[ \frac {(f+g x)^2 \log \left (c \left (d+e x^n\right )^p\right )}{2 g}-\frac {f^2 p \log \left (d+e x^n\right )}{2 g}-\frac {e f n p x^{n+1} \, _2F_1\left (1,1+\frac {1}{n};2+\frac {1}{n};-\frac {e x^n}{d}\right )}{d (n+1)}-\frac {e g n p x^{n+2} \, _2F_1\left (1,\frac {n+2}{n};2 \left (1+\frac {1}{n}\right );-\frac {e x^n}{d}\right )}{2 d (n+2)} \]

[Out]

-e*f*n*p*x^(1+n)*hypergeom([1, 1+1/n],[2+1/n],-e*x^n/d)/d/(1+n)-1/2*e*g*n*p*x^(2+n)*hypergeom([1, (2+n)/n],[2+
2/n],-e*x^n/d)/d/(2+n)-1/2*f^2*p*ln(d+e*x^n)/g+1/2*(g*x+f)^2*ln(c*(d+e*x^n)^p)/g

________________________________________________________________________________________

Rubi [A]  time = 0.14, antiderivative size = 132, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {2463, 1844, 260, 364} \[ \frac {(f+g x)^2 \log \left (c \left (d+e x^n\right )^p\right )}{2 g}-\frac {f^2 p \log \left (d+e x^n\right )}{2 g}-\frac {e f n p x^{n+1} \, _2F_1\left (1,1+\frac {1}{n};2+\frac {1}{n};-\frac {e x^n}{d}\right )}{d (n+1)}-\frac {e g n p x^{n+2} \, _2F_1\left (1,\frac {n+2}{n};2 \left (1+\frac {1}{n}\right );-\frac {e x^n}{d}\right )}{2 d (n+2)} \]

Antiderivative was successfully verified.

[In]

Int[(f + g*x)*Log[c*(d + e*x^n)^p],x]

[Out]

-((e*f*n*p*x^(1 + n)*Hypergeometric2F1[1, 1 + n^(-1), 2 + n^(-1), -((e*x^n)/d)])/(d*(1 + n))) - (e*g*n*p*x^(2
+ n)*Hypergeometric2F1[1, (2 + n)/n, 2*(1 + n^(-1)), -((e*x^n)/d)])/(2*d*(2 + n)) - (f^2*p*Log[d + e*x^n])/(2*
g) + ((f + g*x)^2*Log[c*(d + e*x^n)^p])/(2*g)

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 364

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(a^p*(c*x)^(m + 1)*Hypergeometric2F1[-
p, (m + 1)/n, (m + 1)/n + 1, -((b*x^n)/a)])/(c*(m + 1)), x] /; FreeQ[{a, b, c, m, n, p}, x] &&  !IGtQ[p, 0] &&
 (ILtQ[p, 0] || GtQ[a, 0])

Rule 1844

Int[(Pq_)*((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*Pq*(a +
b*x^n)^p, x], x] /; FreeQ[{a, b, c, m, n, p}, x] && (PolyQ[Pq, x] || PolyQ[Pq, x^n]) &&  !IGtQ[m, 0]

Rule 2463

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))*((f_.) + (g_.)*(x_))^(r_.), x_Symbol] :> Simp[((
f + g*x)^(r + 1)*(a + b*Log[c*(d + e*x^n)^p]))/(g*(r + 1)), x] - Dist[(b*e*n*p)/(g*(r + 1)), Int[(x^(n - 1)*(f
 + g*x)^(r + 1))/(d + e*x^n), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p, r}, x] && (IGtQ[r, 0] || RationalQ[n
]) && NeQ[r, -1]

Rubi steps

\begin {align*} \int (f+g x) \log \left (c \left (d+e x^n\right )^p\right ) \, dx &=\frac {(f+g x)^2 \log \left (c \left (d+e x^n\right )^p\right )}{2 g}-\frac {(e n p) \int \frac {x^{-1+n} (f+g x)^2}{d+e x^n} \, dx}{2 g}\\ &=\frac {(f+g x)^2 \log \left (c \left (d+e x^n\right )^p\right )}{2 g}-\frac {(e n p) \int \left (\frac {f^2 x^{-1+n}}{d+e x^n}+\frac {2 f g x^n}{d+e x^n}+\frac {g^2 x^{1+n}}{d+e x^n}\right ) \, dx}{2 g}\\ &=\frac {(f+g x)^2 \log \left (c \left (d+e x^n\right )^p\right )}{2 g}-(e f n p) \int \frac {x^n}{d+e x^n} \, dx-\frac {\left (e f^2 n p\right ) \int \frac {x^{-1+n}}{d+e x^n} \, dx}{2 g}-\frac {1}{2} (e g n p) \int \frac {x^{1+n}}{d+e x^n} \, dx\\ &=-\frac {e f n p x^{1+n} \, _2F_1\left (1,1+\frac {1}{n};2+\frac {1}{n};-\frac {e x^n}{d}\right )}{d (1+n)}-\frac {e g n p x^{2+n} \, _2F_1\left (1,\frac {2+n}{n};2 \left (1+\frac {1}{n}\right );-\frac {e x^n}{d}\right )}{2 d (2+n)}-\frac {f^2 p \log \left (d+e x^n\right )}{2 g}+\frac {(f+g x)^2 \log \left (c \left (d+e x^n\right )^p\right )}{2 g}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.13, size = 130, normalized size = 0.98 \[ f x \log \left (c \left (d+e x^n\right )^p\right )+\frac {1}{2} g x^2 \log \left (c \left (d+e x^n\right )^p\right )-\frac {e f n p x^{n+1} \, _2F_1\left (1,\frac {n+1}{n};\frac {n+1}{n}+1;-\frac {e x^n}{d}\right )}{d (n+1)}-\frac {e g n p x^{n+2} \, _2F_1\left (1,\frac {n+2}{n};\frac {n+2}{n}+1;-\frac {e x^n}{d}\right )}{2 d (n+2)} \]

Antiderivative was successfully verified.

[In]

Integrate[(f + g*x)*Log[c*(d + e*x^n)^p],x]

[Out]

-((e*f*n*p*x^(1 + n)*Hypergeometric2F1[1, (1 + n)/n, 1 + (1 + n)/n, -((e*x^n)/d)])/(d*(1 + n))) - (e*g*n*p*x^(
2 + n)*Hypergeometric2F1[1, (2 + n)/n, 1 + (2 + n)/n, -((e*x^n)/d)])/(2*d*(2 + n)) + f*x*Log[c*(d + e*x^n)^p]
+ (g*x^2*Log[c*(d + e*x^n)^p])/2

________________________________________________________________________________________

fricas [F]  time = 0.42, size = 0, normalized size = 0.00 \[ {\rm integral}\left ({\left (g x + f\right )} \log \left ({\left (e x^{n} + d\right )}^{p} c\right ), x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)*log(c*(d+e*x^n)^p),x, algorithm="fricas")

[Out]

integral((g*x + f)*log((e*x^n + d)^p*c), x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (g x + f\right )} \log \left ({\left (e x^{n} + d\right )}^{p} c\right )\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)*log(c*(d+e*x^n)^p),x, algorithm="giac")

[Out]

integrate((g*x + f)*log((e*x^n + d)^p*c), x)

________________________________________________________________________________________

maple [F]  time = 2.19, size = 0, normalized size = 0.00 \[ \int \left (g x +f \right ) \ln \left (c \left (e \,x^{n}+d \right )^{p}\right )\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((g*x+f)*ln(c*(e*x^n+d)^p),x)

[Out]

int((g*x+f)*ln(c*(e*x^n+d)^p),x)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ -\frac {1}{4} \, {\left (g n p - 2 \, g \log \relax (c)\right )} x^{2} - {\left (f n p - f \log \relax (c)\right )} x + \frac {1}{2} \, {\left (g x^{2} + 2 \, f x\right )} \log \left ({\left (e x^{n} + d\right )}^{p}\right ) + \int \frac {d g n p x + 2 \, d f n p}{2 \, {\left (e x^{n} + d\right )}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)*log(c*(d+e*x^n)^p),x, algorithm="maxima")

[Out]

-1/4*(g*n*p - 2*g*log(c))*x^2 - (f*n*p - f*log(c))*x + 1/2*(g*x^2 + 2*f*x)*log((e*x^n + d)^p) + integrate(1/2*
(d*g*n*p*x + 2*d*f*n*p)/(e*x^n + d), x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \ln \left (c\,{\left (d+e\,x^n\right )}^p\right )\,\left (f+g\,x\right ) \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(log(c*(d + e*x^n)^p)*(f + g*x),x)

[Out]

int(log(c*(d + e*x^n)^p)*(f + g*x), x)

________________________________________________________________________________________

sympy [C]  time = 12.86, size = 162, normalized size = 1.23 \[ f x \log {\left (c \left (d + e x^{n}\right )^{p} \right )} + \frac {f p x \Phi \left (\frac {d x^{- n} e^{i \pi }}{e}, 1, \frac {e^{i \pi }}{n}\right ) \Gamma \left (\frac {1}{n}\right )}{n \Gamma \left (1 + \frac {1}{n}\right )} + \frac {g x^{2} \log {\left (c \left (d + e x^{n}\right )^{p} \right )}}{2} - \frac {e g p x^{2} x^{n} \Phi \left (\frac {e x^{n} e^{i \pi }}{d}, 1, 1 + \frac {2}{n}\right ) \Gamma \left (1 + \frac {2}{n}\right )}{2 d \Gamma \left (2 + \frac {2}{n}\right )} - \frac {e g p x^{2} x^{n} \Phi \left (\frac {e x^{n} e^{i \pi }}{d}, 1, 1 + \frac {2}{n}\right ) \Gamma \left (1 + \frac {2}{n}\right )}{d n \Gamma \left (2 + \frac {2}{n}\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)*ln(c*(d+e*x**n)**p),x)

[Out]

f*x*log(c*(d + e*x**n)**p) + f*p*x*lerchphi(d*x**(-n)*exp_polar(I*pi)/e, 1, exp_polar(I*pi)/n)*gamma(1/n)/(n*g
amma(1 + 1/n)) + g*x**2*log(c*(d + e*x**n)**p)/2 - e*g*p*x**2*x**n*lerchphi(e*x**n*exp_polar(I*pi)/d, 1, 1 + 2
/n)*gamma(1 + 2/n)/(2*d*gamma(2 + 2/n)) - e*g*p*x**2*x**n*lerchphi(e*x**n*exp_polar(I*pi)/d, 1, 1 + 2/n)*gamma
(1 + 2/n)/(d*n*gamma(2 + 2/n))

________________________________________________________________________________________